-- GENERATED SPELL FOR [Masophet the Black] --


function spell0_16249(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20792,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16249', 7000, 1)
end

function spell1_16249(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(16568,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16249', 3000, 1)
end

function Sorts_16249(pUnit, Event)
local choix_sorts_16249 = math.random(0, 1)
if choix_sorts_16249 == 0 then
pUnit:RegisterEvent('spell0_16249', 1, 1)
end
if choix_sorts_16249 == 1 then
pUnit:RegisterEvent('spell1_16249', 1, 1)
end
end

function mob16249_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16249', math.random(1500, 3000), 1)
end

function mob16249_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16249_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16249_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16249, 1, 'mob16249_Action')
RegisterUnitEvent(16249, 2, 'mob16249_Leave')
RegisterUnitEvent(16249, 3, 'mob16249_Kill')
RegisterUnitEvent(16249, 4, 'mob16249_Die')
